package net.sareweb.acab.entity;

// Generated 30-mar-2010 19:37:37 by Hibernate Tools 3.2.5.Beta

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * Suggestioninfo generated by hbm2java
 */
@Entity
@Table(name = "suggestioninfo", catalog = "acab")
public class Suggestioninfo implements java.io.Serializable {

	private Integer idSuggestionInfo;
	private Date createDate;
	private String infoMsg;
	private String quality;
	private Date lastCommentDate;
	private Set<Commentonsuggestion> commentonsuggestions = new HashSet<Commentonsuggestion>(
			0);
	private List<Suggestion> suggestions = new ArrayList<Suggestion>(0);

	public Suggestioninfo() {
	}

	public Suggestioninfo(Date createDate) {
		this.createDate = createDate;
	}

	public Suggestioninfo(Date createDate, String infoMsg, String quality,
			Date lastCommentDate,
			Set<Commentonsuggestion> commentonsuggestions,
			List<Suggestion> suggestions) {
		this.createDate = createDate;
		this.infoMsg = infoMsg;
		this.quality = quality;
		this.lastCommentDate = lastCommentDate;
		this.commentonsuggestions = commentonsuggestions;
		this.suggestions = suggestions;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idSuggestionInfo", unique = true, nullable = false)
	public Integer getIdSuggestionInfo() {
		return this.idSuggestionInfo;
	}

	public void setIdSuggestionInfo(Integer idSuggestionInfo) {
		this.idSuggestionInfo = idSuggestionInfo;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "createDate", nullable = false, length = 0)
	@NotNull
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "infoMsg", length = 400)
	@Length(max = 400)
	public String getInfoMsg() {
		return this.infoMsg;
	}

	public void setInfoMsg(String infoMsg) {
		this.infoMsg = infoMsg;
	}

	@Column(name = "Quality", length = 45)
	@Length(max = 45)
	public String getQuality() {
		return this.quality;
	}

	public void setQuality(String quality) {
		this.quality = quality;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastCommentDate", length = 0)
	public Date getLastCommentDate() {
		return this.lastCommentDate;
	}

	public void setLastCommentDate(Date lastCommentDate) {
		this.lastCommentDate = lastCommentDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "suggestioninfo")
	public Set<Commentonsuggestion> getCommentonsuggestions() {
		return this.commentonsuggestions;
	}

	public void setCommentonsuggestions(
			Set<Commentonsuggestion> commentonsuggestions) {
		this.commentonsuggestions = commentonsuggestions;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "suggestioninfo")
	public List<Suggestion> getSuggestions() {
		return this.suggestions;
	}

	public void setSuggestions(List<Suggestion> suggestions) {
		this.suggestions = suggestions;
	}

}
